1. Field of the Invention
The present invention relates to an image synthesis processing apparatus and an image synthesis processing method.
2. Description of the Related Art
An image synthesis process is known where an image is enlarged/reduced and the enlarged/reduced image is synthesized with another image (by replacing a portion of the other image with the enlarged/reduced image).
In such an image synthesis process, a foreground image including replacement color pixels is sometimes rotated and the rotated foreground image is synthesized with the background image, if both the background and foreground images are of YUV format.
In YUV422 which is one of the YUV systems where color is represented by a brightness signal Y, blue color difference signal U, and read color difference signal V, information of color difference signals U, V is shared between adjacent two horizontal pixels to reduce a data amount, while preventing image quality deterioration. In YUV444 which is another YUV system, brightness signal Y and color difference signals U, V are sampled from each of every four horizontal pixels.
To rotate a foreground image and synthesize the rotated foreground image with a background image, the foreground image is converted from YUV422 format to YUV444 format, the format-converted foreground image is rotated, and the rotated foreground image is converted from YUV444 format to YUV422 format. At that time, due to pixel interpolation processing, color mixing is sometimes caused between some of replacement color pixels and other image data pixels in the foreground image. As a result, color-mixed pixels appear at a boundary between the background and foreground images, so that the boundary between the images becomes unclear.
Generally, if the degree of color mixing between image data pixel and replacement color pixel is less than a threshold value, color-mixed pixels are each regarded as a replacement color pixel.
Heretofore, a method has been proposed that converts a color-mixed pixel into a replacement color pixel by using algorism or the like. Also proposed is an image synthesis method, in which when an image with a transparent portion is enlarged/reduced and the enlarged/reduced image is synthesized with another image, complementary processing is performed to prevent the synthesized image from becoming unnatural (see, for example, Japanese Laid-open Patent Publication No. 2009-94902).
Still another image synthesis method has been proposed, in which interpolation is performed between replacement color pixels and image data pixels in a foreground image, thereby causing a boundary between the foreground and background images to be natural (see, for example, Japanese Laid-open Patent Publication No. H5-120417).
In this method, an adjustment object region to be subjected to adjustment or modification (hereinafter, referred to adjustment) is extracted from a color image, a target color in the adjustment is specified, and the color of the entire adjustment object region is changed to the target color. At that time, in addition to the color adjustment for the adjustment object region, an additive color mixing process is performed on a boundary between a background part and the adjustment object region. As a result, natural color adjustment or image synthesis is realized, while maintaining data continuity in the original image, thereby making it possible to prevent a pseudo contour from being generated at the boundary between the adjustment object region and the other region, so that the nature of image is not impaired. When two images are synthesized, color adjustment is performed at a boundary of the two images such that the synthesized image becomes natural.
Since an ordinary digital camera or the like is limited in processing speed and memory capacity, image processing is performed in YUV422 format. In the YUV422 format, information of color difference signals U, V is shared between adjacent two pixels, and therefore, interpolation processing is performed to generate UV data for each pixel at the time of conversion from YUV422 format to YUV444 format. As a result, color mixing is caused in each two pixels. In other words, color mixing tends to occur at a boundary between image data pixels and replacement color pixels in a foreground image when image processing is performed in YUV422 format than when performed in YUV444 format, so that a clear synthesis image cannot be generated.